import 'dart:ui';

import 'package:flutter/material.dart';

class ContainerVC extends StatelessWidget{

  @override
  Widget build(BuildContext context) {
    // TODO: implement build
    return Scaffold(
      appBar: AppBar(title: Text("容器类Widget"),),
      body:
      Center(
        child: Column(
          children: [
            Padding(
              padding: EdgeInsets.only(top: 15,bottom: 15),
              child: DecoratedBox(
                decoration: BoxDecoration(
                    gradient: LinearGradient(colors: [Colors.red,Colors.green],begin: Alignment.topLeft,end: Alignment.bottomRight),
                    borderRadius: BorderRadius.circular(8),
                    boxShadow: [
                      BoxShadow(
                          color: Colors.black54,
                          offset: Offset(0.0,0.0),
                          blurRadius: 8.0
                      )
                    ]
                ),
                child: Container(
                  alignment: Alignment.center,
                  width: 160,
                  height: 80,
                  child: Text("装饰容器",textAlign: TextAlign.center,style: TextStyle(fontSize: 18,color: Colors.white),),
                ),
              ),
            ),

            //Transform
            Padding(padding: EdgeInsets.only(top: 15,bottom: 15),
              child: Container(
                color: Colors.black87.withAlpha(970),
                child: Transform(
                  transform: Matrix4.skewY(0.2),
                  child: Container(
                    alignment: Alignment.center,
                    width: 160,
                    height: 60,
                    color: Colors.red,
                    child: Text("Transform",style: TextStyle(fontSize: 18,color: Colors.white),),
                  ),
                ),
              ),
            )
          ],
        ),
      )
    );
  }
}